package P1000;

import java.text.DecimalFormat;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * @author: zhouyang
 * @descrpition: 动态规划 注意越界
 * @time: 2019-09-25 11:21
 */
public class P1002_过河卒 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int finalX = scanner.nextInt();
        int finalY = scanner.nextInt();
        int horseX = scanner.nextInt();
        int horseY = scanner.nextInt();
        invoke(finalX,finalY,horseX,horseY);
        scanner.close();
    }

    private static void invoke(int finalX, int finalY, int horseX, int horseY) {
        double[][] dp = new double[finalX+1][finalY+1];
        int max = Math.max(finalX,finalY);
        Set<Double> forbidden = buildForbidden(finalX,finalY,horseX,horseY);
        if(forbidden.contains(0)) {
            System.out.println(0);
            return ;//出门就死了
        }
        dp[0][0] = 1;
        for(int i=1;i<=finalX;++i) {
            double code = encode(i,0,max);
            if(forbidden.contains(code)){
                dp[i][0] = -1;
                while(++i <= finalX){
                    dp[i][0] = -1;
                }
                break;
            }
            else dp[i][0] = 1;
        }
        for(int i=1;i<=finalY;++i) {
            double code = encode(0,i,max);
            if(forbidden.contains(code)) {
                dp[0][i] = -1;
                while(++i <= finalY) {
                    dp[0][i] = -1;
                }
                break;
            }
            else dp[0][i] = 1;
        }
        for(int i=1;i<=finalX;++i){
            for(int j=1;j<=finalY;++j){
                 double code = encode(i,j,max);
                 if(forbidden.contains(code)){
                     dp[i][j] = -1;
                     continue;
                 }
                 double now = 0;
                 if(dp[i-1][j] != -1) now += dp[i-1][j];
                 if(dp[i][j-1] != -1) now += dp[i][j-1];
                 dp[i][j] = now;
            }
        }
        System.out.println(dp[finalX][finalY]);
        DecimalFormat df = new DecimalFormat("#0.#");
        String s = df.format(dp[finalX][finalY]);
        System.out.println(s);
    }

    private static double encode(int x,int y,int max){
        return x*max+y;
    }

    private static Set<Double> buildForbidden(int finalX, int finalY, int horseX, int horseY){
        int max = Math.max(finalX,finalY);
        Set<Double> set = new HashSet<>();
        set.add(encode(horseX,horseY,max));
        if(horseX-1 >= 0 && horseY-2 >= 0){
            set.add(encode(horseX-1,horseY-2,max));
        }
        if(horseX-2 >= 0 && horseY-1 >= 0){
            set.add(encode(horseX-2,horseY-1,max));
        }
        if(horseX-2 >= 0 && horseY+1 <= finalY){
            set.add(encode(horseX-2,horseY+1,max));
        }
        if(horseX-1 >= 0 && horseY+2 <= finalY){
            set.add(encode(horseX-1,horseY+2,max));
        }
        if(horseX+1 <= finalX && horseY+2 <= finalY){
            set.add(encode(horseX+1,horseY+2,max));
        }
        if(horseX+2 <= finalX && horseY+1 <= finalY){
            set.add(encode(horseX+2,horseY+1,max));
        }
        if(horseX+2 <= finalX && horseY-1 >= 0){
            set.add(encode(horseX+2,horseY-1,max));
        }
        if(horseX+1 <= finalX && horseY-2 >= 0){
            set.add(encode(horseX+1,horseY-2,max));
        }
        return set;
    }
}
